Skip to content

fix(test): fix CachedLDAPAuthorizationModuleLegacyTest flakiness caused by Thread.sleep()#1748

Merged
jbonofre merged 1 commit intoapache:mainfrom
jbonofre:fix/flaky-cached-ldap-authorization-test
Mar 10, 2026
Merged

fix(test): fix CachedLDAPAuthorizationModuleLegacyTest flakiness caused by Thread.sleep()#1748
jbonofre merged 1 commit intoapache:mainfrom
jbonofre:fix/flaky-cached-ldap-authorization-test

Conversation

@jbonofre
Copy link
Member

Replace Thread.sleep() calls with Wait.waitFor() in AbstractCachedLDAPAuthorizationMapLegacyTest to fix testRestartAsync timeout.

The root cause was that getReadACLs called while LDAP was down triggered an async reconnection task that blocked the single-threaded updater on a TCP connect timeout, causing all subsequent reconnection attempts to be silently discarded.

…ed by Thread.sleep

Replace Thread.sleep calls with Wait.waitFor in AbstractCachedLDAPAuthorizationMapLegacyTest
to fix testRestartAsync timeout. The root cause was that getReadACLs called while LDAP was
down triggered an async reconnection task that blocked the single-threaded updater on a TCP
connect timeout, causing all subsequent reconnection attempts to be silently discarded.
@jbonofre jbonofre requested a review from jeanouii March 10, 2026 07:19
@jbonofre jbonofre merged commit 9ca4eb1 into apache:main Mar 10, 2026
28 of 30 checks passed
@jbonofre jbonofre deleted the fix/flaky-cached-ldap-authorization-test branch March 10, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants